package com.hqyj.controller.TraderAndStorage;


import com.hqyj.pojo.ResultVoH;
import com.hqyj.pojo.Storage;
import com.hqyj.service.IStorageService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author rock
 * @since 2022-10-03
 */
@RestController
@RequestMapping("/user")
public class StorageController {

    @Resource
    private IStorageService storageService;


    @GetMapping("/storage")
    public ResultVoH showStorage(Storage storage){
        return storageService.queryStorage(storage);
    }

    @GetMapping("/updateStorage")
    public ResultVoH updateStorage(Storage storage){
        return storageService.updateByCondition(storage);
    }

    @GetMapping("/addStorage")
    public ResultVoH addStorage(Storage storage){
        return storageService.addStorage(storage);
    }

    @GetMapping("/deleteStorage")
    public ResultVoH deleteStorage(Storage storage){
        return storageService.deleteStorage(storage);
    }
}

